<?php
/**
 * 订单
 * User: yuanxuncheng
 * Date: 2017/1/2
 * Time: 21:45
 */

namespace app\api\controller;

use app\api\model\page\payment\Alipay as AlipayModel;
use app\api\model\page\payment\Wxpay as WxpayModel;
use think\Request;

class Payment
{

    private $alipayModel;
    private $wxpayModel;

    public function __construct()
    {
        $this->param = Request::instance()->param();
    }

    /**
     * @desc 支付宝支付异步通知
     * @return array
     * @throws \think\Exception
     */
    public function alipay()
    {
        $this->alipayModel = new AlipayModel();
        return $this->alipayModel->excute($this->param);
    }

    /**
     * @desc 微信支付异步通知
     * @return array
     */
    public function wxpay()
    {
        $this->wxpayModel = new WxpayModel();
        return $this->wxpayModel->excute($this->param);
    }
}
